import request from "./Request.js";

/**
 * 获取消息
 */
export function getMessage() {
	return request({
		url: "/message",
		method: "GET"
	});
}

/**
 * 删除消息
 */
export function deleteMessage() {
	return request({
		url: "/message",
		method: "DELETE"
	});
}

/**
 * 设置消息为已读
 */
export function updateMessageRead(messageIds) {
	return request({
		url: "/message/read",
		data: {
			messageIds: messageIds
		},
		method: "POST"
	});
}

/**
 * 设置所有消息为已读
 */
export function updateAllMessageRead() {
	return request({
		url: "/message/readAll",
		method: "POST"
	});
}